﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.DataProtection.KeyManagement;

namespace ViazyNetCore
{
    public interface ICurrentUser
    {
        public long Id { get; }

        bool IsAuthenticated { get; }

        public string Username { get; }

        public string Nickname { get; }

        public string PhoneNumber { get; }

        public string[] Roles { get; }

        public AuthUserType IdentityType { get; }

        /// <summary>
        /// 是否被管制
        /// </summary>
        bool IsModerated { get; }

        public long TenantId { get; }

        Claim? FindClaim(string claimType);

        Claim[] FindClaims(string claimType);

        Claim[] GetAllClaims();
    }
}
